<%@ page language="java" pageEncoding="UTF-8"%>
<%@ include file="/inc/taglibs.jsp"%>
<script type="text/javascript">
	
</script>

<form id="pagerForm" method="post" action="${path }/admin/goodsEvaluate">
	<input type="hidden" name="eqUserId" value="${eqUserId }"/>
	<input type="hidden" name="eqGoodsId" value="${eqGoodsId }" />
	<input type="hidden" name="eqMealId" value="${eqMealId }" />
	<input type="hidden" name="eqStatus" value="${eqStatus }" />
	<input type="hidden" name="pageNum" value="${pageTurn.page }" />
	<input type="hidden" name="numPerPage" value="${pageTurn.pageSize }" />
	<input type="hidden" name="rel" value="${rel }" />
</form>

<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${path }/admin/goodsEvaluate" method="post">
	<div class="searchBar">
		<table class="searchContent">
			<tr>
				<td>
					用户ID：
				</td>
				<td>
					<input type="text" size="15" name="eqUserId" value="${eqUserId }"/>
				</td>
				<td>
					商品ID：
				</td>
				<td>
					<input type="text" size="15" name="eqGoodsId" value="${eqGoodsId }"/>
				</td>
				<td>
					套餐ID：
				</td>
				<td>
					<input type="text" size="15" name="eqMealId" value="${eqMealId }"/>
				</td>
                <td>                                                                               
					状态：
				</td>
				<td>
					<select  name="eqStatus" id="eqStatus" class="combox">
						<option value="">请选择</option>
						<c:forEach items="${auditGoodsMap}" var="entry">
							<option value="${entry.key}">${entry.value}</option>
						</c:forEach>
					</select>
				</td>
				<td>
					<div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
				</td>
			</tr>
		</table>
		<script type="text/javascript">
			jQuery('#eqStatus').val("${eqStatus }");
		</script>
	</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li><a class="add" href="${path }/admin/goodsEvaluate/audit.do?status=${AUDITED_PASS }&rel=${rel}" target="selectedTodo" rel="ids" title="确定审核通过?"><span>审核通过</span></a></li>
			<li><a class="add" href="${path }/admin/goodsEvaluate/audit.do?status=${AUDITED_NOTPASS }&rel=${rel}" target="selectedTodo" rel="ids" title="确定审核不通过?"><span>审核不通过</span></a></li>
			<li><a class="delete" href="${path }/admin/goodsEvaluate/audit.do?status=${AUDITED_DELETED }&rel=${rel}" target="selectedTodo" rel="ids" title="确定删除?"><span>删除</span></a></li>
			<li class="line">line</li>
		</ul>
	</div>

	 <table class="table" width="100%" layoutH="115">
            <thead>
			<tr>
				<th>ID<label style="float:left"><input type="checkbox" class="checkboxCtrl" group="ids" /></label></th>
				<th>用户ID</th>
				<th>订单号</th>
				<th>商品ID</th>
				<th>套餐ID</th>
				<th>评论内容</th>
				<th>状态</th>
				<th>评论时间</th>
				<th>操作</th>
			</tr>
		</thead>
		  <tbody> 
		  			<c:choose>
						<c:when test="${null==goodsEvaluateList||goodsEvaluateList.isEmpty()}">
							<tr class="tatr2">
								<td colspan="8" align="center">暂无数据</td>
							</tr>
						</c:when>
						<c:otherwise>
							<c:forEach items="${goodsEvaluateList}" var="goodsEvaluate">
								<tr target="id" rel="${goodsEvaluate.id}">
								<td>
									<input type="checkbox" name="ids" id="ids" value="${goodsEvaluate.id}"/>${goodsEvaluate.id}
								</td>
								<td>${goodsEvaluate.userId}</td>
								<td>${goodsEvaluate.orderId}</td>
								<td>${goodsEvaluate.goodsId}</td>
								<td>${goodsEvaluate.mealId}</td>
								<td>${goodsEvaluate.content}</td>
								<td>${auditGoodsMap[goodsEvaluate.status]}</td>
								<td><fmt:formatDate value="${goodsEvaluate.createTime }" pattern="yyyy-MM-dd HH:mm:ss" /></td>
								<td><c:if
										test="${goodsEvaluate.status == AUDITED_NOTPASS }">
										<a title="审核不通过的原因" target="dialog"
											href="${path}/admin/goodsEvaluate/desc?id=${goodsEvaluate.id}&userId=${goodsEvaluate.userId }&rel=${rel}"
											rel="${rel}" width="500" height="400"><span>填写原因</span></a>
									</c:if></td>
							</tr>
							</c:forEach>
						</c:otherwise>
					</c:choose>
		</tbody>
	</table>
    <div style="clear:both"></div>
    <div class="panelBar">
        <%@ include file="/inc/admin_pagination.jsp" %>
    </div>
</div>

